/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package eu.easyedu.dictionary.explorer.actions;

import eu.easyedu.dictionary.api.importer.DictionaryImporter;
import eu.easyedu.dictionary.api.importer.impl.XDXFDictionaryImporter;
import eu.easyedu.dictionary.api.resources.Bundle;
import java.awt.event.ActionEvent;
import java.io.File;
import javax.swing.AbstractAction;
import org.openide.filesystems.FileUtil;

/**
 *
 * @author Michal HLavac <hlavki@hlavki.eu>
 */
public class ImportDictionaryAction extends AbstractAction {

    private static final long serialVersionUID = 1L;

    public ImportDictionaryAction() {
        String name = Bundle.getMessage("ImportDictionaryAction.name");
        putValue(NAME, name);
    }

    public void actionPerformed(ActionEvent e) {
        DictionaryImporter importer = new XDXFDictionaryImporter();
        File file = new File("/data/home/hlavki/develop/personal/xdxf-parser/src/test/resources/test-dict.xdxf");
        importer.importDictionary(FileUtil.toFileObject(file));
    }
}
